import { enumProperties } from './common'

// tree
export const treeProperties = [
    ...enumProperties.filter(e => ['enum'].indexOf(e.model) !== -1),
    {
        model: 'ui.nodeKey',
        widget: 'input',
        label: '唯一标识',
        ui: {
            placeholder: '请输入唯一标识，必填',
            maxlength: 20
        }
    },
    {
        model: 'ui.showCheckbox',
        widget: 'switch',
        label: '可被勾选'
    },
    {
        model: 'ui.checkStrictly',
        widget: 'switch',
        label: '父子节点不关联'
    },
    {
        model: 'ui.emptyText',
        widget: 'input',
        label: '内容为空时展示类容',
        ui: {
            placeholder: '内容为空时展示类容',
            maxlength: 200
        }
    },
    {
        model: 'ui.defaultExpandAll',
        widget: 'switch',
        label: '默认展开所有节点'
    },
    {
        model: 'ui.expandOnClickNode',
        widget: 'switch',
        label: '点击节点的时候展开或者收缩节点'
    },
    {
        model: 'ui.checkOnClickNode',
        widget: 'switch',
        label: '点击节点的时候选中节点'
    },
    {
        model: 'ui.highlightCurrent',
        widget: 'switch',
        label: '高亮当前选中节点'
    },
    {
        model: 'ui.accordion',
        widget: 'switch',
        label: '手风琴模式'
    },
    {
        model: 'ui.indent',
        widget: 'inputNumber',
        label: '水平缩进(px)',
        ui: {
            placeholder: '请输入水平缩进距离',
            min: 0,
            max: 99999999,
            precision: 2,
            controlsPosition: 'right',
            style: {
                width: '100%'
            }
        }
    }
]
